Release 10.1A: OpenEdge Data Management:
SQL Reference


CURRVAL

CURRVAL returns the current value of a sequence, and uses the following syntax to reference the current value of a sequence.

schema.sequence.CURRVAL 

schema

Specifies the schema that contains the sequence. To refer to the current value of a sequence in the schema of another user, you must have SELECT object privilege on the sequence.

sequence

Specifies the name of the sequence whose current value you want.

Use CURRVAL in the:

CURRVAL cannot be used in:

Example

In the following example, the OpenEdge SQL sequence generator returns the current value of the customer sequence:

SELECT customer_sequence.CURRVAL FROM pub.customer; 


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095